package com.mskj.zxmy.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mskj.zxmy.dto.ProductDetailDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "入库单实体")
public class StockIn {

    @Schema(description = "主键ID", example = "1")
    private Integer id;                // 主键ID
    
    @Schema(description = "单据类型", example = "采购入库")
    private String documentType;      // 单据类型

    @Schema(description = "入库状态")
    private String repositoryStatus;

    @Schema(description = "实际入库数量")
    private Integer numberOfPhysicalEntries;
    
    @Schema(description = "入库单号/单据编号")
    private String repositoryNumber;  // 入库单号
    
    @Schema(description = "操作人")
    private String operator;          // 操作人
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(description = "入库日期")
    private Date repositoryDate;      // 入库日期
    
    @Schema(description = "审批状态", example = "待审批")
    private String approvalStatus;    // 审批状态

    // private String libraryDetails; // 子表，通常不直接映射
    
    @Schema(description = "关联供应商")
    private String associatedSuppliers;  // 关联供应商

    @Schema(description = "批次号")
    private String singleBatch;       // 批次号
    
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(description = "创建时间")
    private String createTime;      // 创建时间
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(description = "更新时间")
    private String updateTime;      // 更新时间

    @Schema(description = "对账单号")
    private String billNumber;
    @Schema(description = "入库数量总")
    private int numberOfReconciliations;
    @Schema(description = "入库明细列表")
    private List<ProductDetailDTO> details;

    @Schema(description = "工艺任务Id")
    private Integer tasks;
    @Schema(description = "工艺任务单号")
    private String tasks1;
    @Schema(description = "工艺名称")
    private String tasksInfo;
    @Schema(description = "生产任务")
    private Integer productionTasks;
    @Schema(description = "生产任务单号")
    private String productionTasksInfo;



}
